package com.example.xm.web;

import lombok.Data;

@Data
public class Result {
    private Integer code;
    private String msg;
    private Object data;
    public static Result success(){
        Result result = new Result();
        result.setCode(200);
        return result;
    }
    public static Result success(Object data){
        Result success = success();
//       Result result = new Result();
//       result.setCode(ServiceCode.OK);
        success.setData(data);
        return success;
    }
    public static Result fail(Integer code,String msg){
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }
}
